package com.example.archermind.myapplication;

import android.content.Intent;
import android.os.Bundle;
import android.os.RemoteException;
import android.view.View;
import android.widget.Button;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class NotificationActivity extends BaseActivity implements View.OnClickListener{

    @BindView(R.id.btn_notificationbinder)
    Button btnNotificationbinder;
    @BindView(R.id.btn_addNotification)
    Button btnAddNotification;
    @BindView(R.id.btn_addPopup)
    Button btnAddPopup;
    @BindView(R.id.btn_delAllNotification)
    Button btnDelAllNotification;
    @BindView(R.id.btn_registerNotificationCallback)
    Button btnRegisterNotificationCallback;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_notification);
        unbinder = ButterKnife.bind(this);

    }

    @Override
    @OnClick({R.id.btn_notificationbinder,R.id.btn_addNotification,R.id.btn_addPopup,R.id.btn_delAllNotification,R.id.btn_registerNotificationCallback})
    public void onClick(View v){
        Intent intent;
        switch (v.getId()) {
            case R.id.btn_notificationbinder:
                getNotificationService();
                break;
            case R.id.btn_addNotification:
                intent = new Intent(this, AddNotificationActivity.class);
                startActivity(intent);
                break;
            case R.id.btn_addPopup:
                intent = new Intent(this, AddPopUpActivity.class);
                startActivity(intent);
                break;
            case R.id.btn_delAllNotification:
                intent = new Intent(this, DelAllNotificationActivity.class);
                startActivity(intent);
                break;
            case R.id.btn_registerNotificationCallback:
                try {
                    getNotificationService().registerNotificationCallback(getNotificationGatewayCallback());
                } catch (RemoteException e) {
                    e.printStackTrace();
                }
                break;
        }
    }

}
